#pragma once
#ifndef GAME_H
#define GAME_H

#endif // GAME_H

#include "SceneManager.h"
#include "ServerManager.h"
#include "ClientManager.h"
#include "dandytanks.h"
#include <QFile>
#include <cstdio>
#include <QTimer>
#include <QDesktopWidget>
#include <QApplication>
#include <QVector>
class Game : public QObject
{
    Q_OBJECT
public:
    Game(DandyTanks *Form, QApplication *application);
    ~Game();
public slots:
    void slotServerModGameStart();
    void slotClientModGameStart(QString ip, QString port, QString nick);
    void slotEscGame();
    void slotCreateServer(QString nick);
    void slotRejected(QString);
    void slotAccepted(int);
    //Получить плейлист от сервера
    void slotGetPlayList(QStringList);
    void slotStartClientGame();
   // void slotPresKey(QKeyEvent * event);
signals:
   // void signalPresKey(QKeyEvent * event);
    void signalSendNick(QString);
    void signalConnect();
    void signalClientDisconnect();
private:
    DandyTanks* m_form;
    SceneManager* m_scenManager;
    ServerManager* m_serverManager;
    ClientManager* m_clientManager;
    QTimer* timer;
    int m_ip;
    int m_port;
};
